package org.tacticalTroopers.jme.server;

import org.tacticalTroopers.jme.common.message.PlayerNames;

import com.jme3.network.message.Message;

public class PlayerNameManager {

	PlayerNames playerNames = new PlayerNames();

	Boolean namesNeedToBeSend = false;
	
	public String getName(Integer id) {
		return playerNames.getPlayerName(id);
	}

	public void setPlayerName(Integer id, String name) {
		playerNames.setPlayerName(id,name);
		namesNeedToBeSend = true;
		
	}

	public Boolean isNamesNeedToBroadcasted() {
		return namesNeedToBeSend;
	}
	
	public void setNamesNeedToBroadcasted(Boolean bool) {
		namesNeedToBeSend = bool;
	}

	public PlayerNames getPlayerNamesMessage() {
		return playerNames;
	}

}
